package voidlib.menu;

import java.util.LinkedList;
import voidlib.*;

/**
 * @author nevidimov
 */
public class VoidMenu {
    public LinkedList<VoidMenuItem> items;
    
    public VoidMenu() {
        UserRole role = VoidUser.getInstance().role;
        items = new LinkedList<VoidMenuItem>();
        
        if (role == UserRole.Businessman) {
            items.add(new VoidMenuItem("businessman.htm?act=listcredits", "Credits"));
            items.add(new VoidMenuItem("businessman.htm?act=agencies", "Agencies"));
        } else
        if (role == UserRole.Bank) {
            items.add(new VoidMenuItem("bank.htm?act=listcredits", "Credits"));
        } else 
        if (role == UserRole.Guest) {
            items.add(new VoidMenuItem("account.htm?act=login", "Login"));
        } else 
        if (role == UserRole.Admin) {
            items.add(new VoidMenuItem("admin.htm?act=accounts", "Accounts"));
        } else 
        if (role == UserRole.Bandit) {
            items.add(new VoidMenuItem("bandit.htm?act=listinvites", "Incoming invites to clans"));
            items.add(new VoidMenuItem("bandit.htm?act=createclan", "Create a new clan"));
            items.add(new VoidMenuItem("bandit.htm?act=createinvite", "Invite to my clan"));
            items.add(new VoidMenuItem("bandit.htm?act=myclan", "View my clan"));
        } 
    }
}
